using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

namespace GGameFramework.Event
{
    public interface IListener { void OnEventRaised(); }
    public interface IListener<in T0> { void OnEventRaised(T0 arg); }
    public interface IListener<in T0, in T1> { void OnEventRaised(T0 arg0, T1 arg1); }
    public interface IListener<in T0, in T1, in T2> { void OnEventRaised(T0 arg0, T1 arg1, T2 arg2); }
    public interface IListener<in T0, in T1, in T2, in T3> { void OnEventRaised(T0 arg0, T1 arg1, T2 arg2, T3 arg3); }
    
    // /// <summary>
    // /// Listener无参
    // /// </summary>
    // public class Listener : MonoBehaviour, IListener
    // {
    //     [SerializeField] private GameEvent _event;
    //     private GameEvent Event => _event;
    //
    //     [SerializeField] private UnityEvent _response;
    //     private UnityEvent Response => _response;
    //
    //     private void OnEnable()
    //     {
    //         if (Event != null)
    //         {
    //             Event.Register(this);
    //         }
    //     }
    //
    //     private void OnDisable()
    //     {
    //         if (Event != null)
    //         {
    //             Event.Unregister(this);
    //         }
    //     }
    //
    //     public void OnEventRaised() => Response?.Invoke();
    // }
}
